<template>
    <div class="header">
        <div class="left">
            <i :class="$store.state.userMenuData.menuShow?'el-icon-s-fold':'el-icon-s-unfold'" @click="$store.commit('userMenuData/isShow',true)"></i>
        </div>
        <div class="right">
            <i class=" el-icon-question"></i>
        <el-dropdown trigger="click">
                <el-image
      src="http://xue.cnkdl.cn:23683/static/img/profile.c8874b67.jpg"
     ></el-image> <i class="el-icon-caret-bottom"></i>
  <el-dropdown-menu slot="dropdown">
    <el-dropdown-item>个人中心</el-dropdown-item>
    <el-dropdown-item>布局设置</el-dropdown-item>
    <el-dropdown-item><span @click="loginOutFn">退出登录</span></el-dropdown-item>
  </el-dropdown-menu>
</el-dropdown>
           
        </div>
    </div>
</template>

<script>
import {logoutAPI} from "@/API/hbaip/api";
export default {
methods:{
    loginOutFn(){
    localStorage.removeItem("Authorization");
    setTimeout(()=>{
        this.$router.push('/login');
        this.$message({
                        type: 'success',
                        message: '退出成功!'
                    });
      }, 2000)
}
}
}
</script>

<style lang="less" scoped>
.header{
    display: flex;
    justify-content: space-between;
    line-height: 60px;
    align-items: center;
    padding: 10px;
}
/deep/ .el-image{
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 10px;
}
</style>